import { Label } from "cc"
import { TbRoot } from "../../platform/excel_table/TbRoot"
import { UIComponent } from "../../platform/ui/UIComponent"
import { bind } from "../../platform/ui/UIDecorator"
import { Tb_Monster, Tb_MonsterContainer } from "../tb/TB_Monster"
import { BuffMgr } from "./BuffMgr"
import { PropSet } from "./PropertySet"
import { Skill } from "./Skill"
import { SkillMgr } from "./SkillMgr"
import { Tb_Hero, Tb_HeroContainer } from "../tb/TB_Hero"
import { BattleObj } from "./BattleObj"

export default class Hero extends BattleObj{

    @bind(Label)
    show_id:Label

    uid:number = 0
    cfgId:number
    cfg:Tb_Hero
    //生命周期状态
    lifeStatus:number
    //战斗状态
    battleStatus:number

    propSet:PropSet = new PropSet()

    //技能管理器
    // skillMgr:SkillMgr
    //buff管理器
    buffMgr:BuffMgr
    init(id:number){
        this.cfgId = id
        let container =TbRoot.ins.getTbContainer(Tb_HeroContainer)
        this.cfg = container.getCfgById(id)
        // this.skillMgr = new SkillMgr(this,this.cfg.skills)
    }
    protected start(): void {
        this.show_id.string = this.cfg.name
    }

    tick(detaltaTime:number){
        //释放技能
        // this.skillMgr.releaseSkill();
    }

    releaseSkill(){

    }
}